package com.huluobo.a2112mvvmdouyindemo.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2112mvvmdouyindemo.R;
import com.huluobo.a2112mvvmdouyindemo.utils.ImageLoader;
import com.huluobo.mvvm_base.bean.LikeVideoBeanResult;

import java.util.List;

/**
 * Created by LC on 2024/4/11.
 */
public class LikeAdapter extends BaseQuickAdapter<LikeVideoBeanResult.LikeVideoBean, BaseViewHolder> {
    public LikeAdapter(@Nullable List<LikeVideoBeanResult.LikeVideoBean> data) {
        super(R.layout.item_like, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, LikeVideoBeanResult.LikeVideoBean likeVideoBean) {
        ImageLoader.getInstance().loadImage(getContext(), likeVideoBean.getVideomainimg(),
                baseViewHolder.getView(R.id.item_like_video_iv));
        baseViewHolder.setText(R.id.item_like_desc_tv, likeVideoBean.getCaption());
    }
}
